<div bsModal #createOrEditModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="createOrEditModal" aria-hidden="true" [config]="{ backdrop: 'static' }">
    <div class="modal-dialog modal-xxl">
        <div class="modal-content">
            <form *ngIf="active" #editForm="ngForm" novalidate (ngSubmit)="save()">
                <div class="modal-header">

                    <span style="margin-left:10px;">选择时间：</span>
                    <div style="width:520px;display:inline-block;">
                        <p-calendar [(ngModel)]="selectedDate" name="cal" view="month" dateFormat="yy-mm" [yearNavigator]="true" yearRange="2000:2030" [locale]="calendarHelper.cn"></p-calendar>
                    </div>
                    <button type="button" class="close" (click)="close()" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <div class="m-portlet m-portlet--mobile">
                        <div class="m-portlet__body">
                            <table class="table table-bordered" border="0">
                                <thead>
                                    <tr>
                                        <th>型号</th>
                                        <th>主材成本</th>
                                        <th>辅材成本</th>
                                        <th>标准件</th>
                                        <th>外协加工费</th>
                                        <th>工装成本</th>
                                        <th>人工成本</th>
                                        <th>燃料动力</th>
                                        <th>制造费用</th>
                                        <th>其他直接成本</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <ng-container *ngFor="let record of tabledata">
                                        <tr>
                                            <td style="width: 100px !important">

                                                {{ record.modelCode }}
                                            </td>

                                            <td>
                                                <div class="input-group input-group-sm mb-3">
                                                    <input type="number" name="zhuCaiCost" class="form-control" aria-label="Sizing example input" [(ngModel)]="record.zhuCaiCost" aria-describedby="inputGroup-sizing-sm" />
                                                </div>

                                            </td>
                                            <td>
                                                <div class="input-group input-group-sm mb-3">
                                                    <input type="number" name="fuCaiCost" class="form-control" [(ngModel)]="record.fuCaiCost" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-sm" />
                                                </div>
                                            </td>
                                            <td>
                                                <div class="input-group input-group-sm mb-3">
                                                    <input type="number" name="biaoZhunJianCost" class="form-control" [(ngModel)]="record.biaoZhunJianCost" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-sm" />
                                                </div>
                                            </td>
                                            <td>
                                                <div class="input-group input-group-sm mb-3">
                                                    <input type="number" name="waiXieCost" class="form-control" [(ngModel)]="record.waiXieCost" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-sm" />
                                                </div>
                                            </td>
                                            <td>
                                                <div class="input-group input-group-sm mb-3">
                                                    <input type="number" name="gongZhuangCost" class="form-control" [(ngModel)]="record.gongZhuangCost" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-sm" />
                                                </div>
                                            </td>
                                            <td>
                                                <div class="input-group input-group-sm mb-3">
                                                    <input type="number" name="renGongCost" class="form-control" [(ngModel)]="record.renGongCost" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-sm" />
                                                </div>
                                            </td>
                                            <td>
                                                <div class="input-group input-group-sm mb-3">
                                                    <input type="number" name="ranDongCost" class="form-control" [(ngModel)]="record.ranDongCost" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-sm" />
                                                </div>
                                            </td>
                                            <td>
                                                <div class="input-group input-group-sm mb-3">
                                                    <input type="number" name="zhiZaoCost" class="form-control" [(ngModel)]="record.zhiZaoCost" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-sm" />
                                                </div>
                                            </td>
                                            <td>
                                                <div class="input-group input-group-sm mb-3">
                                                    <input type="number" name="qiTaCost" class="form-control" [(ngModel)]="record.qiTaCost" aria-label="Sizing example input" aria-describedby="inputGroup-sizing-sm" />
                                                </div>
                                            </td>
                                        </tr>
                                    </ng-container>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button [disabled]="saving" type="button" class="btn btn-default" (click)="close()">
                        {{ l('Cancel') }}
                    </button>
                    <button type="submit" class="btn btn-primary blue" [disabled]="!editForm.form.valid" [buttonBusy]="saving" [busyText]="'保存中...'">
                        <i class="fa fa-save"></i>
                        <span>{{ l('Save') }}</span>
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>